import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:shop/common/common.dart';
import 'package:shop/login/login.dart';
import 'package:shop/router.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Shop',
      theme: ThemeData(
        primaryColor: const Color(0xff5C96EA),
        highlightColor: Colors.transparent,
        splashColor: Colors.transparent,
        appBarTheme: AppBarTheme(elevation: 0, brightness: Brightness.light),
        primaryTextTheme:
            TextTheme(headline6: TextStyle(fontSize: 17, fontFamily: "PingFang-Medium", color: AppColor.font333)),
      ),
      debugShowCheckedModeBanner: false,
      onGenerateRoute: onGenerateRoute,
      home: LoginPage(),
      builder: (context, child) {
        return Material(
          type: MaterialType.transparency,
          child: FlutterEasyLoading(
            child: child,
          ),
        );
      },
    );
  }
}
